/*
 * Copyright (c) 2018. Beyondsoft Corporation.
 * All Rights Reserved.
 *
 * BEYONDSOFT CONFIDENTIALITY
 *
 * The information in this file is confidential and privileged from Beyondsoft Corporation,
 * which is intended only for use solely by Beyondsoft Corporation.
 * Disclosure, copying, distribution, or use of the contents of this file by persons other than Beyondsoft Corporation
 * is strictly prohibited and may violate applicable laws.
 */

package com.beyondsoft.common.core.sys.controller;

import com.beyondsoft.common.core.redis.RedisService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 验证登录controller.
 *
 * @author jiangwu@beyondsoft.com
 * @date 2018-04-18
 * @version: 1.0
 */
public abstract class CheckLoginController {

    @Autowired
    protected RedisService redisService;

//    private UsersToken user;

    /**
     * 加载当前用户信息.
     */
    public void load(String token) {
//        if (StringUtils.isNotBlank(token)) {
//            if (redisService.exists(token)) {
//                user = (UsersToken) redisService.get(token);
//                return;
//            }
//        }
//        throw new GeneralException(GeneralException.LOGIN_ERROR,MsgKey.KEY_ERROR_SECURITY_ERROR, MsgKey.KEY_ERROR_SECURITY_ERROR);
    }

//    public UsersToken getUser() {
//        return user;
//    }
}
